package com.lf.api;

public class Constants {

	/** 用户登陆存入SESSION中的值 */
	public static final String USER_LOGIN = "user_login";

	public static final int DEFAULT_PAGE_SIZE = 20;

	/** 数据可用性类型定义 */
	public static final class DataType {
		public static final short OK = 0;
		public static final short FORBIDDEN = -1;
	}

	/** 回复类型定义 */
	public static final class ReplyType {
		public static final short REPLY_COMMENT = 0;
		public static final short REPLY_REPLY = 1;
	}

	/** 点赞类型定义 */
	public static final class GreateType {
		public static final short COMMENT = 0;
		public static final short REPLY = 1;
		public static final short SUBJECT = 2;
		public static final short QUESTION = 3;
	}

	public static final class WeiXinURL {
		// 凭证获取（GET）
		public final static String TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
		// 获取用户信息
		public final static String USER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID";

		// 自定义菜单创建接口：
		public final static String MENU_CREATE_URL = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN";
		// 自定义菜单查询接口：
		public final static String MENU_GET_URL = "https://api.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN";
		// 自定义菜单删除接口：
		public final static String MENU_DELETE_URL = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=ACCESS_TOKEN";
	
		// 自定义菜单删除接口：
		public final static String JSAPI_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi";
		
		//获取网页授权凭证
		public final static String OAUTH2_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
	
		//获取网页授权凭证
		public final static String OAUTH2_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
		public final static String  SNS_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
	
		//下载
		public final static String DOWNLOAD_URL = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID";
	}
	
	public static final class WeiXinCache {
		public static volatile String ACCESS_TOKEN = "";
		public static volatile String JSAPI_TICKET = "";
	}
	
	public static final String BASE_URL = "base_url";
	public static final String VOICE_PATH = "voice_path";
	public static final int NOT_CHECK_LOGIN = 0;
	public static final int CHECK_LOGIN = 1;
}
